import { defineStore } from 'pinia';
import { ref } from 'vue';
import { TotalBaseInfo } from '@/http/public.type.ts';

const useBaseInfoStore = defineStore(
  'totalInfo',
  () => {
    const totalBaseInfo = ref<TotalBaseInfo>();

    const setTotalBaseInfo = (tokenValue: TotalBaseInfo) => {
      totalBaseInfo.value = tokenValue;
    };

    return {
      totalBaseInfo,
      setTotalBaseInfo
    };
  },
  {
    persist: true
  }
);

export default useBaseInfoStore;
